/*
 * Game.h
 *
 *  Created on: 04/07/2011
 *      Author: Rafael
 */

#ifndef GAME_H_
#define GAME_H_

#include "entity/ObjectManager.h"
#include "core/MapManager.h"
#include <implementation.hpp>
#include "Dialog.h"
using namespace e2d::core;

class GameState;

class Game : public Implementation {
protected:
	ObjectManager *objMg;
	MapManager *mapMg;
	map<int, GameState*> stateList;
	int current;
	int previous;
	bool loop;
	Dialog *dialog;
public:
    MapManager *getMapMg() const;
    ObjectManager *getObjMg() const;
    void setMapMg(MapManager *mapMg);
    void setObjMg(ObjectManager *objMg);

    GameState *getState();
    void ChangeState(int state, Utilities *Utils);
    GameState *GetPrevious();
    void RevertState(Utilities *Utils);

	Game();
	virtual ~Game();

    bool getLoop() const;
    void setLoop(bool loop);
    Dialog *getDialog() const;
    void setDialog(Dialog *dialog);
};

#endif /* GAME_H_ */
